package com.emergency.embackend.controller;

import com.emergency.embackend.entity.Quiz;
import com.emergency.embackend.service.TestFirstService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Arrays;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/testFirst")
public class TestFirstController {
    @Autowired
    private TestFirstService testFirstService;

    @GetMapping("/getByTypeId")
    public Map<Integer, List<Quiz>> getByTypeId() {
        List<Integer> typeIds = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8);
        return testFirstService.getByTypeId(typeIds); // 使用实例调用方法
    }
}